﻿<controls:ChildWindow x:Class="MedLink2011.Views.Patients.ChildWindows.SurgeriesCW"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
mc:Ignorable="d"
Title="SurgeriesEditWindow"
xmlns:viewModels="clr-namespace:MedLink2011.Views.Patients.ViewModels" 
xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
xmlns:appControls="clr-namespace:MedLink2011.Controls">
<!--29 Fields --> 
    <controls:ChildWindow.Resources>
        <viewModels:SurgeryViewModel x:Key="SurgeryViewModel"></viewModels:SurgeryViewModel>
    </controls:ChildWindow.Resources>
    <appControls:BusyIndicator x:Name="BusyIndicator" BusyContent="Loading Patients data...." DataContext="{Binding Source={StaticResource SurgeryViewModel}}" Foreground="SlateGray" IsBusy="{Binding IsBusy}">
<Grid x:Name="LayoutRoot" DataContext="{Binding Source={StaticResource SurgeryViewModel}}" Background="WhiteSmoke" >
        <Border BorderBrush="#FF505050"  BorderThickness="2"  CornerRadius="10">
            <Border.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#EDD1DE86" Offset="0.8" />
                    <GradientStop Color="AliceBlue" Offset="1.09" />
                </LinearGradientBrush>
          </Border.Background>
<ScrollViewer x:Name="scrollViewerSurgeries" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" >
<Grid HorizontalAlignment="Left" x:Name="SurgeriesGrid" VerticalAlignment="Top">
<Grid.RowDefinitions>
<RowDefinition Height="32" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
    <ColumnDefinition Width="30" />
    <ColumnDefinition Width="Auto" />
    <ColumnDefinition Width="Auto" />
	<ColumnDefinition Width="50" />
	<ColumnDefinition Width="Auto" />
	<ColumnDefinition Width="Auto" />
    <ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>


<StackPanel Grid.Column="1" Grid.Row="1" Orientation="vertical"  >
<TextBlock Height="20" Margin="0,5" ToolTipService.ToolTip="Surgery Id" ToolTipService.Placement="Right" Text="Surgery Id:"  Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Appendectomy" ToolTipService.Placement="Right" Text="Appendectomy:"  Margin="0,5" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Aderial Bypass" ToolTipService.Placement="Right" Text="Aderial Bypass:"  Margin="0,5" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Coronas Ades Bypass" ToolTipService.Placement="Right" Text="Coronas Ades Bypass:"  Margin="0,5" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Cardiac Valve Repair Or Replace" ToolTipService.Placement="Right" Text="Cardiac Valve Repair Or Replace:"  Margin="0,5" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Carotid Endaderectomy" ToolTipService.Placement="Right" Text="Carotid Endaderectomy:"  Margin="0,5" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Cholecystectomy" ToolTipService.Placement="Right" Text="Cholecystectomy:"  Margin="0,5" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Colon Resedion" ToolTipService.Placement="Right" Text="Colon Resedion:"  Margin="0,5" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Hysterectomy" ToolTipService.Placement="Right" Text="Hysterectomy:"  Margin="0,5" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Nephrectomy" ToolTipService.Placement="Right" Text="Nephrectomy:"  Margin="0,5" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Splenedomy" ToolTipService.Placement="Right" Text="Splenedomy:"  Margin="0,5" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Pacemaker" ToolTipService.Placement="Right" Text="Pacemaker:"  Margin="0,5" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Defibnllator" ToolTipService.Placement="Right" Text="Defibnllator:"  Margin="0,5" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Hip Replaoment" ToolTipService.Placement="Right" Text="Hip Replaoment:"  Margin="0,5" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />

</StackPanel>
<StackPanel Grid.Column="2" Grid.Row="1" Orientation="vertical"  >
<TextBlock  Height="26" HorizontalAlignment="Left" Margin="2" x:Name="Surgery_idTextBox" Text="{Binding Path=CurrentSurgery.Surgery_id, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" />
<CheckBox ToolTipService.ToolTip="Appendectomy" ToolTipService.Placement="Right" Content=""  Height="26" HorizontalAlignment="Left" Margin="2" x:Name="AppendectomyCheckBox" IsChecked="{Binding Path=CurrentSurgery.Appendectomy, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left" />
<CheckBox ToolTipService.ToolTip="Aderial Bypass" ToolTipService.Placement="Right" Content=""  Height="26" HorizontalAlignment="Left" Margin="2" x:Name="Aderial_bypassCheckBox" IsChecked="{Binding Path=CurrentSurgery.Aderial_bypass, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left" />
<CheckBox ToolTipService.ToolTip="Coronas Ades Bypass" ToolTipService.Placement="Right" Content=""  Height="26" HorizontalAlignment="Left" Margin="2" x:Name="Coronas_Ades_BypassCheckBox" IsChecked="{Binding Path=CurrentSurgery.Coronas_Ades_Bypass, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left" />
<CheckBox ToolTipService.ToolTip="Cardiac Valve Repair Or Replace" ToolTipService.Placement="Right" Content=""  Height="26" HorizontalAlignment="Left" Margin="2" x:Name="Cardiac_valve_repair_or_replaceCheckBox" IsChecked="{Binding Path=CurrentSurgery.Cardiac_valve_repair_or_replace, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left" />
<CheckBox ToolTipService.ToolTip="Carotid Endaderectomy" ToolTipService.Placement="Right" Content=""  Height="26" HorizontalAlignment="Left" Margin="2" x:Name="Carotid_EndaderectomyCheckBox" IsChecked="{Binding Path=CurrentSurgery.Carotid_Endaderectomy, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left" />
<CheckBox ToolTipService.ToolTip="Cholecystectomy" ToolTipService.Placement="Right" Content=""  Height="26" HorizontalAlignment="Left" Margin="2" x:Name="CholecystectomyCheckBox" IsChecked="{Binding Path=CurrentSurgery.Cholecystectomy, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left" />
<CheckBox ToolTipService.ToolTip="Colon Resedion" ToolTipService.Placement="Right" Content=""  Height="26" HorizontalAlignment="Left" Margin="2" x:Name="Colon_resedionCheckBox" IsChecked="{Binding Path=CurrentSurgery.Colon_resedion, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left" />
<CheckBox ToolTipService.ToolTip="Hysterectomy" ToolTipService.Placement="Right" Content=""  Height="26" HorizontalAlignment="Left" Margin="2" x:Name="HysterectomyCheckBox" IsChecked="{Binding Path=CurrentSurgery.Hysterectomy, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left" />
<CheckBox ToolTipService.ToolTip="Nephrectomy" ToolTipService.Placement="Right" Content=""  Height="26" HorizontalAlignment="Left" Margin="2" x:Name="NephrectomyCheckBox" IsChecked="{Binding Path=CurrentSurgery.Nephrectomy, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left" />
<CheckBox ToolTipService.ToolTip="Splenedomy" ToolTipService.Placement="Right" Content=""  Height="26" HorizontalAlignment="Left" Margin="2" x:Name="SplenedomyCheckBox" IsChecked="{Binding Path=CurrentSurgery.Splenedomy, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left" />
<CheckBox ToolTipService.ToolTip="Pacemaker" ToolTipService.Placement="Right" Content=""  Height="26" HorizontalAlignment="Left" Margin="2" x:Name="PacemakerCheckBox" IsChecked="{Binding Path=CurrentSurgery.Pacemaker, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left" />
<CheckBox ToolTipService.ToolTip="Defibnllator" ToolTipService.Placement="Right" Content=""  Height="26" HorizontalAlignment="Left" Margin="2" x:Name="DefibnllatorCheckBox" IsChecked="{Binding Path=CurrentSurgery.Defibnllator, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left" />
<CheckBox ToolTipService.ToolTip="Hip Replaoment" ToolTipService.Placement="Right" Content=""  Height="26" HorizontalAlignment="Left" Margin="2" x:Name="Hip_replaomentCheckBox" IsChecked="{Binding Path=CurrentSurgery.Hip_replaoment, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left" />

</StackPanel>
                        <StackPanel Margin="0,10" Grid.Column="0" Grid.Row="2" Orientation="Horizontal"  Grid.ColumnSpan="3">
                            <Button Margin="20,0,0,0" Style="{StaticResource GreenButton}" x:Name="CancelButton" Content="Cancelar"  Background="Blue" Width="75" Height="23" HorizontalAlignment="Right"  />
                            <Button Margin="20,0,0,0" Style="{StaticResource OrangeButton}" x:Name="SaveButton" Content="Guardar" Background="Green" Width="75" Height="23" HorizontalAlignment="Right" Command="{Binding SaveSurgeryCommand}" />
                        </StackPanel>
           <StackPanel Orientation="Horizontal" Margin="0,20,0,0" Grid.Column="5" Grid.Row="1" >
                <StackPanel Orientation="Vertical" Margin="0,10,0,0" Grid.Column="6" Grid.Row="1" >
                    <TextBlock Height="20" ToolTipService.ToolTip="Knee Replacement" ToolTipService.Placement="Right" Text="Knee Replacement:"  Margin="0,10,0,0"  Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Organ Transplant" ToolTipService.Placement="Right" Text="Organ Transplant:"  Margin="0,5" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Other Surgery" ToolTipService.Placement="Right" Text="Other Surgery:"  Margin="0,5" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Other Sugery Desc" ToolTipService.Placement="Right" Text="Other Sugery Desc:"  Margin="0,5" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Sugeries Notes" ToolTipService.Placement="Right" Text="Sugeries Notes:"  Margin="0,5" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Surgery Name" ToolTipService.Placement="Right" Text="Surgery Name:"  Margin="0,5" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Surgery Date" ToolTipService.Placement="Right" Text="Surgery Date:"  Margin="0,5" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Surgery Pathology" ToolTipService.Placement="Right" Text="Surgery Pathology:"  Margin="0,5" Foreground="#FF7635FC" FontWeight="Bold"  Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Surgery Description" ToolTipService.Placement="Right" Text="Surgery Description:"  Margin="0,5" Foreground="#FF7635FC" FontWeight="Bold"  Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Doctor Id" ToolTipService.Placement="Right" Text="Doctor Id:"  Margin="0,5"  Foreground="#FF7635FC" FontWeight="Bold"  Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />
<TextBlock Height="20" ToolTipService.ToolTip="Patient Id" ToolTipService.Placement="Right" Text="Patient Id:"  Margin="0,5"  Foreground="#FF7635FC" FontWeight="Bold"  Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="None" />

                </StackPanel>
                <StackPanel Orientation="Vertical" Margin="0,10,0,0" >
                    <CheckBox ToolTipService.ToolTip="Knee Replacement" ToolTipService.Placement="Right" Content=""  Height="26" HorizontalAlignment="Left" Margin="2" x:Name="Knee_replacementCheckBox" IsChecked="{Binding Path=CurrentSurgery.Knee_replacement, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left" />
<CheckBox ToolTipService.ToolTip="Organ Transplant" ToolTipService.Placement="Right" Content=""  Height="26" HorizontalAlignment="Left" Margin="2" x:Name="Organ_transplantCheckBox" IsChecked="{Binding Path=CurrentSurgery.Organ_transplant, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left" />
<CheckBox ToolTipService.ToolTip="Other Surgery" ToolTipService.Placement="Right" Content=""  Height="26" HorizontalAlignment="Left" Margin="2" x:Name="Other_SurgeryCheckBox" IsChecked="{Binding Path=CurrentSurgery.Other_Surgery, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left" />
<TextBox ToolTipService.ToolTip="Other Sugery Desc" ToolTipService.Placement="Right" Height="26" HorizontalAlignment="Left" Margin="2" x:Name="Other_Sugery_DescTextBox" Text="{Binding Path=CurrentSurgery.Other_Sugery_Desc, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left"  MaxLength="200"/>
<TextBox ToolTipService.ToolTip="Sugeries Notes" ToolTipService.Placement="Right" Height="26" HorizontalAlignment="Left" Margin="2" x:Name="Sugeries_NotesTextBox" Text="{Binding Path=CurrentSurgery.Sugeries_Notes, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left"  MaxLength="1000"/>
<TextBox ToolTipService.ToolTip="Surgery Name" ToolTipService.Placement="Right" Height="26" HorizontalAlignment="Left" Margin="2" x:Name="Surgery_NameTextBox" Text="{Binding Path=CurrentSurgery.Surgery_Name, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left"  MaxLength="100"/>
<sdk:DatePicker ToolTipService.ToolTip="Surgery Date" ToolTipService.Placement="Right"  Height="26" HorizontalAlignment="Left" Margin="2" x:Name="Surgery_DateDatePicker" SelectedDate="{Binding Path=CurrentSurgery.Surgery_Date, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left" />
<TextBox ToolTipService.ToolTip="Surgery Pathology" ToolTipService.Placement="Right" Height="26" HorizontalAlignment="Left" Margin="2" x:Name="Surgery_PathologyTextBox" Text="{Binding Path=CurrentSurgery.Surgery_Pathology, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left"  Background="#FFFFFFDC"  MaxLength="1000"/>
<TextBox ToolTipService.ToolTip="Surgery Description" ToolTipService.Placement="Right" Height="26" HorizontalAlignment="Left" Margin="2" x:Name="Surgery_DescriptionTextBox" Text="{Binding Path=CurrentSurgery.Surgery_Description, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left"  Background="#FFFFFFDC"  MaxLength="1000"/>
<TextBlock  Height="26" HorizontalAlignment="Left" Margin="2" x:Name="Doctor_IdTextBox" Text="{Binding Path=CurrentSurgery.Doctor_Id, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" Visibility="Collapsed" />
<ComboBox ToolTipService.ToolTip="Doctor Id" ToolTipService.Placement="Right" Height="26" Margin="2" x:Name="Doctor_IdComboBox" ItemsSource="{Binding DoctorCollection, Mode=TwoWay}" DisplayMemberPath = "First_Name" SelectedItem="{Binding SelectedDoctor, Mode=TwoWay}" VerticalAlignment="Top" Width="150" >
<ComboBox.BorderBrush>
<SolidColorBrush Color="GreenYellow"/>
</ComboBox.BorderBrush>
</ComboBox>
<TextBlock  Height="26" HorizontalAlignment="Left" Margin="2" x:Name="Patient_IdTextBox" Text="{Binding Path=Patient_Id, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120"  />

                </StackPanel>
            </StackPanel>
    
    
      
        </Grid>
        </ScrollViewer>
        </Border>
    </Grid>
    </appControls:BusyIndicator>
</controls:ChildWindow>
